3.4.63 \(\int \frac {\tan ^5(e+f x)}{(a+b \sec ^2(e+f x))^3} \, dx\) [363]

Optimal. Leaf size=78 \[ \frac {(a+b)^2}{4 a^3 f \left (b+a \cos ^2(e+f x)\right )^2}-\frac {a+b}{a^3 f \left (b+a \cos ^2(e+f x)\right )}-\frac {\log \left (b+a \cos ^2(e+f x)\right )}{2 a^3 f} \]

[Out]

1/4*(a+b)^2/a^3/f/(b+a*cos(f*x+e)^2)^2+(-a-b)/a^3/f/(b+a*cos(f*x+e)^2)-1/2*ln(b+a*cos(f*x+e)^2)/a^3/f

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4223, 455, 45} \begin {gather*} \frac {(a+b)^2}{4 a^3 f \left (a \cos ^2(e+f x)+b\right )^2}-\frac {a+b}{a^3 f \left (a \cos ^2(e+f x)+b\right )}-\frac {\log \left (a \cos ^2(e+f x)+b\right )}{2 a^3 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Tan[e + f*x]^5/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

(a + b)^2/(4*a^3*f*(b + a*Cos[e + f*x]^2)^2) - (a + b)/(a^3*f*(b + a*Cos[e + f*x]^2)) - Log[b + a*Cos[e + f*x]
^2]/(2*a^3*f)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 455

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && EqQ[m
- n + 1, 0]

Rule 4223

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> Module[{ff =
 FreeFactors[Cos[e + f*x], x]}, Dist[-(f*ff^(m + n*p - 1))^(-1), Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*
(ff*x)^n)^p/x^(m + n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\tan ^5(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx &=-\frac {\text {Subst}\left (\int \frac {x \left (1-x^2\right )^2}{\left (b+a x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {\text {Subst}\left (\int \frac {(1-x)^2}{(b+a x)^3} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac {\text {Subst}\left (\int \left (\frac {(a+b)^2}{a^2 (b+a x)^3}-\frac {2 (a+b)}{a^2 (b+a x)^2}+\frac {1}{a^2 (b+a x)}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=\frac {(a+b)^2}{4 a^3 f \left (b+a \cos ^2(e+f x)\right )^2}-\frac {a+b}{a^3 f \left (b+a \cos ^2(e+f x)\right )}-\frac {\log \left (b+a \cos ^2(e+f x)\right )}{2 a^3 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 2.37, size = 136, normalized size = 1.74 \begin {gather*} -\frac {2 \left (a^2+4 a b+3 b^2\right )+(a+2 b)^2 \log (a+2 b+a \cos (2 (e+f x)))+a^2 \cos ^2(2 (e+f x)) \log (a+2 b+a \cos (2 (e+f x)))+2 a \cos (2 (e+f x)) (2 (a+b)+(a+2 b) \log (a+2 b+a \cos (2 (e+f x))))}{2 a^3 f (a+2 b+a \cos (2 (e+f x)))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Tan[e + f*x]^5/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

-1/2*(2*(a^2 + 4*a*b + 3*b^2) + (a + 2*b)^2*Log[a + 2*b + a*Cos[2*(e + f*x)]] + a^2*Cos[2*(e + f*x)]^2*Log[a +
 2*b + a*Cos[2*(e + f*x)]] + 2*a*Cos[2*(e + f*x)]*(2*(a + b) + (a + 2*b)*Log[a + 2*b + a*Cos[2*(e + f*x)]]))/(
a^3*f*(a + 2*b + a*Cos[2*(e + f*x)])^2)

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 80, normalized size = 1.03

method result size
derivativedivides \(\frac {\frac {-2 a -2 b}{2 a^{3} \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}+\frac {a^{2}+2 a b +b^{2}}{4 a^{3} \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )^{2}}-\frac {\ln \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}{2 a^{3}}}{f}\) \(80\)
default \(\frac {\frac {-2 a -2 b}{2 a^{3} \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}+\frac {a^{2}+2 a b +b^{2}}{4 a^{3} \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )^{2}}-\frac {\ln \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}{2 a^{3}}}{f}\) \(80\)
risch \(\frac {i x}{a^{3}}+\frac {2 i e}{a^{3} f}-\frac {4 \left (a^{2} {\mathrm e}^{6 i \left (f x +e \right )}+a b \,{\mathrm e}^{6 i \left (f x +e \right )}+a^{2} {\mathrm e}^{4 i \left (f x +e \right )}+4 a b \,{\mathrm e}^{4 i \left (f x +e \right )}+3 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+a^{2} {\mathrm e}^{2 i \left (f x +e \right )}+a b \,{\mathrm e}^{2 i \left (f x +e \right )}\right )}{a^{3} f \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )^{2}}-\frac {\ln \left ({\mathrm e}^{4 i \left (f x +e \right )}+\frac {2 \left (a +2 b \right ) {\mathrm e}^{2 i \left (f x +e \right )}}{a}+1\right )}{2 a^{3} f}\) \(196\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(f*x+e)^5/(a+b*sec(f*x+e)^2)^3,x,method=_RETURNVERBOSE)

[Out]

1/f*(1/2*(-2*a-2*b)/a^3/(b+a*cos(f*x+e)^2)+1/4*(a^2+2*a*b+b^2)/a^3/(b+a*cos(f*x+e)^2)^2-1/2/a^3*ln(b+a*cos(f*x
+e)^2))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 116, normalized size = 1.49 \begin {gather*} \frac {\frac {4 \, {\left (a^{2} + a b\right )} \sin \left (f x + e\right )^{2} - 3 \, a^{2} - 6 \, a b - 3 \, b^{2}}{a^{5} \sin \left (f x + e\right )^{4} + a^{5} + 2 \, a^{4} b + a^{3} b^{2} - 2 \, {\left (a^{5} + a^{4} b\right )} \sin \left (f x + e\right )^{2}} - \frac {2 \, \log \left (a \sin \left (f x + e\right )^{2} - a - b\right )}{a^{3}}}{4 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^5/(a+b*sec(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

1/4*((4*(a^2 + a*b)*sin(f*x + e)^2 - 3*a^2 - 6*a*b - 3*b^2)/(a^5*sin(f*x + e)^4 + a^5 + 2*a^4*b + a^3*b^2 - 2*
(a^5 + a^4*b)*sin(f*x + e)^2) - 2*log(a*sin(f*x + e)^2 - a - b)/a^3)/f

________________________________________________________________________________________

Fricas [A]
time = 3.35, size = 122, normalized size = 1.56 \begin {gather*} -\frac {4 \, {\left (a^{2} + a b\right )} \cos \left (f x + e\right )^{2} - a^{2} + 2 \, a b + 3 \, b^{2} + 2 \, {\left (a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}\right )} \log \left (a \cos \left (f x + e\right )^{2} + b\right )}{4 \, {\left (a^{5} f \cos \left (f x + e\right )^{4} + 2 \, a^{4} b f \cos \left (f x + e\right )^{2} + a^{3} b^{2} f\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^5/(a+b*sec(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

-1/4*(4*(a^2 + a*b)*cos(f*x + e)^2 - a^2 + 2*a*b + 3*b^2 + 2*(a^2*cos(f*x + e)^4 + 2*a*b*cos(f*x + e)^2 + b^2)
*log(a*cos(f*x + e)^2 + b))/(a^5*f*cos(f*x + e)^4 + 2*a^4*b*f*cos(f*x + e)^2 + a^3*b^2*f)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 921 vs. \(2 (66) = 132\).
time = 83.21, size = 921, normalized size = 11.81 \begin {gather*} \begin {cases} \frac {\tilde {\infty } x \tan ^{5}{\left (e \right )}}{\sec ^{6}{\left (e \right )}} & \text {for}\: a = 0 \wedge b = 0 \wedge f = 0 \\\frac {\frac {\log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {\tan ^{4}{\left (e + f x \right )}}{4 f} - \frac {\tan ^{2}{\left (e + f x \right )}}{2 f}}{a^{3}} & \text {for}\: b = 0 \\\frac {- \frac {\tan ^{4}{\left (e + f x \right )}}{2 f \sec ^{6}{\left (e + f x \right )}} - \frac {\tan ^{2}{\left (e + f x \right )}}{2 f \sec ^{6}{\left (e + f x \right )}} - \frac {1}{6 f \sec ^{6}{\left (e + f x \right )}}}{b^{3}} & \text {for}\: a = 0 \\\frac {x \tan ^{5}{\left (e \right )}}{\left (a + b \sec ^{2}{\left (e \right )}\right )^{3}} & \text {for}\: f = 0 \\- \frac {2 a^{2} \log {\left (- \sqrt {- \frac {a}{b}} + \sec {\left (e + f x \right )} \right )}}{4 a^{5} f + 8 a^{4} b f \sec ^{2}{\left (e + f x \right )} + 4 a^{3} b^{2} f \sec ^{4}{\left (e + f x \right )}} - \frac {2 a^{2} \log {\left (\sqrt {- \frac {a}{b}} + \sec {\left (e + f x \right )} \right )}}{4 a^{5} f + 8 a^{4} b f \sec ^{2}{\left (e + f x \right )} + 4 a^{3} b^{2} f \sec ^{4}{\left (e + f x \right )}} + \frac {2 a^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{4 a^{5} f + 8 a^{4} b f \sec ^{2}{\left (e + f x \right )} + 4 a^{3} b^{2} f \sec ^{4}{\left (e + f x \right )}} + \frac {a^{2} \tan ^{4}{\left (e + f x \right )}}{4 a^{5} f + 8 a^{4} b f \sec ^{2}{\left (e + f x \right )} + 4 a^{3} b^{2} f \sec ^{4}{\left (e + f x \right )}} - \frac {2 a^{2} \tan ^{2}{\left (e + f x \right )}}{4 a^{5} f + 8 a^{4} b f \sec ^{2}{\left (e + f x \right )} + 4 a^{3} b^{2} f \sec ^{4}{\left (e + f x \right )}} - \frac {4 a b \log {\left (- \sqrt {- \frac {a}{b}} + \sec {\left (e + f x \right )} \right )} \sec ^{2}{\left (e + f x \right )}}{4 a^{5} f + 8 a^{4} b f \sec ^{2}{\left (e + f x \right )} + 4 a^{3} b^{2} f \sec ^{4}{\left (e + f x \right )}} - \frac {4 a b \log {\left (\sqrt {- \frac {a}{b}} + \sec {\left (e + f x \right )} \right )} \sec ^{2}{\left (e + f x \right )}}{4 a^{5} f + 8 a^{4} b f \sec ^{2}{\left (e + f x \right )} + 4 a^{3} b^{2} f \sec ^{4}{\left (e + f x \right )}} + \frac {4 a b \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )} \sec ^{2}{\left (e + f x \right )}}{4 a^{5} f + 8 a^{4} b f \sec ^{2}{\left (e + f x \right )} + 4 a^{3} b^{2} f \sec ^{4}{\left (e + f x \right )}} - \frac {2 a b \tan ^{2}{\left (e + f x \right )} \sec ^{2}{\left (e + f x \right )}}{4 a^{5} f + 8 a^{4} b f \sec ^{2}{\left (e + f x \right )} + 4 a^{3} b^{2} f \sec ^{4}{\left (e + f x \right )}} - \frac {2 b^{2} \log {\left (- \sqrt {- \frac {a}{b}} + \sec {\left (e + f x \right )} \right )} \sec ^{4}{\left (e + f x \right )}}{4 a^{5} f + 8 a^{4} b f \sec ^{2}{\left (e + f x \right )} + 4 a^{3} b^{2} f \sec ^{4}{\left (e + f x \right )}} - \frac {2 b^{2} \log {\left (\sqrt {- \frac {a}{b}} + \sec {\left (e + f x \right )} \right )} \sec ^{4}{\left (e + f x \right )}}{4 a^{5} f + 8 a^{4} b f \sec ^{2}{\left (e + f x \right )} + 4 a^{3} b^{2} f \sec ^{4}{\left (e + f x \right )}} + \frac {2 b^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )} \sec ^{4}{\left (e + f x \right )}}{4 a^{5} f + 8 a^{4} b f \sec ^{2}{\left (e + f x \right )} + 4 a^{3} b^{2} f \sec ^{4}{\left (e + f x \right )}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)**5/(a+b*sec(f*x+e)**2)**3,x)

[Out]

Piecewise((zoo*x*tan(e)**5/sec(e)**6, Eq(a, 0) & Eq(b, 0) & Eq(f, 0)), ((log(tan(e + f*x)**2 + 1)/(2*f) + tan(
e + f*x)**4/(4*f) - tan(e + f*x)**2/(2*f))/a**3, Eq(b, 0)), ((-tan(e + f*x)**4/(2*f*sec(e + f*x)**6) - tan(e +
 f*x)**2/(2*f*sec(e + f*x)**6) - 1/(6*f*sec(e + f*x)**6))/b**3, Eq(a, 0)), (x*tan(e)**5/(a + b*sec(e)**2)**3,
Eq(f, 0)), (-2*a**2*log(-sqrt(-a/b) + sec(e + f*x))/(4*a**5*f + 8*a**4*b*f*sec(e + f*x)**2 + 4*a**3*b**2*f*sec
(e + f*x)**4) - 2*a**2*log(sqrt(-a/b) + sec(e + f*x))/(4*a**5*f + 8*a**4*b*f*sec(e + f*x)**2 + 4*a**3*b**2*f*s
ec(e + f*x)**4) + 2*a**2*log(tan(e + f*x)**2 + 1)/(4*a**5*f + 8*a**4*b*f*sec(e + f*x)**2 + 4*a**3*b**2*f*sec(e
 + f*x)**4) + a**2*tan(e + f*x)**4/(4*a**5*f + 8*a**4*b*f*sec(e + f*x)**2 + 4*a**3*b**2*f*sec(e + f*x)**4) - 2
*a**2*tan(e + f*x)**2/(4*a**5*f + 8*a**4*b*f*sec(e + f*x)**2 + 4*a**3*b**2*f*sec(e + f*x)**4) - 4*a*b*log(-sqr
t(-a/b) + sec(e + f*x))*sec(e + f*x)**2/(4*a**5*f + 8*a**4*b*f*sec(e + f*x)**2 + 4*a**3*b**2*f*sec(e + f*x)**4
) - 4*a*b*log(sqrt(-a/b) + sec(e + f*x))*sec(e + f*x)**2/(4*a**5*f + 8*a**4*b*f*sec(e + f*x)**2 + 4*a**3*b**2*
f*sec(e + f*x)**4) + 4*a*b*log(tan(e + f*x)**2 + 1)*sec(e + f*x)**2/(4*a**5*f + 8*a**4*b*f*sec(e + f*x)**2 + 4
*a**3*b**2*f*sec(e + f*x)**4) - 2*a*b*tan(e + f*x)**2*sec(e + f*x)**2/(4*a**5*f + 8*a**4*b*f*sec(e + f*x)**2 +
 4*a**3*b**2*f*sec(e + f*x)**4) - 2*b**2*log(-sqrt(-a/b) + sec(e + f*x))*sec(e + f*x)**4/(4*a**5*f + 8*a**4*b*
f*sec(e + f*x)**2 + 4*a**3*b**2*f*sec(e + f*x)**4) - 2*b**2*log(sqrt(-a/b) + sec(e + f*x))*sec(e + f*x)**4/(4*
a**5*f + 8*a**4*b*f*sec(e + f*x)**2 + 4*a**3*b**2*f*sec(e + f*x)**4) + 2*b**2*log(tan(e + f*x)**2 + 1)*sec(e +
 f*x)**4/(4*a**5*f + 8*a**4*b*f*sec(e + f*x)**2 + 4*a**3*b**2*f*sec(e + f*x)**4), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 531 vs. \(2 (74) = 148\).
time = 2.05, size = 531, normalized size = 6.81 \begin {gather*} -\frac {\frac {2 \, \log \left (a + b + \frac {2 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {2 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}{a^{3}} - \frac {4 \, \log \left ({\left | -\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1 \right |}\right )}{a^{3}} - \frac {3 \, a^{2} + 6 \, a b + 3 \, b^{2} + \frac {20 \, a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {8 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {12 \, b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {50 \, a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {28 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {18 \, b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {20 \, a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {8 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {12 \, b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, a^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {6 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {3 \, b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}}{{\left (a + b + \frac {2 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {2 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}^{2} a^{3}}}{4 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^5/(a+b*sec(f*x+e)^2)^3,x, algorithm="giac")

[Out]

-1/4*(2*log(a + b + 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 2*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + a*
(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2)/a^3 - 4*log(abs(-(cos
(f*x + e) - 1)/(cos(f*x + e) + 1) + 1))/a^3 - (3*a^2 + 6*a*b + 3*b^2 + 20*a^2*(cos(f*x + e) - 1)/(cos(f*x + e)
 + 1) + 8*a*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 12*b^2*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 50*a^2*(c
os(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 28*a*b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 18*b^2*(cos(f*x +
 e) - 1)^2/(cos(f*x + e) + 1)^2 + 20*a^2*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 8*a*b*(cos(f*x + e) - 1)^
3/(cos(f*x + e) + 1)^3 - 12*b^2*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 3*a^2*(cos(f*x + e) - 1)^4/(cos(f*
x + e) + 1)^4 + 6*a*b*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 3*b^2*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1
)^4)/((a + b + 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 2*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + a*(cos(
f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2)^2*a^3))/f

________________________________________________________________________________________

Mupad [B]
time = 4.60, size = 166, normalized size = 2.13 \begin {gather*} \frac {\mathrm {atanh}\left (\frac {4\,b^2\,{\mathrm {tan}\left (e+f\,x\right )}^2}{8\,b^2+\frac {8\,b^3}{a}+4\,b^2\,{\mathrm {tan}\left (e+f\,x\right )}^2+\frac {8\,b^3\,{\mathrm {tan}\left (e+f\,x\right )}^2}{a}}\right )}{a^3\,f}+\frac {\frac {-a^3+3\,a\,b^2+2\,b^3}{4\,a^2\,b^2}-\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (a^2-b^2\right )}{2\,a^2\,b}}{f\,\left (2\,a\,b+a^2+b^2+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (2\,b^2+2\,a\,b\right )+b^2\,{\mathrm {tan}\left (e+f\,x\right )}^4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(e + f*x)^5/(a + b/cos(e + f*x)^2)^3,x)

[Out]

atanh((4*b^2*tan(e + f*x)^2)/(8*b^2 + (8*b^3)/a + 4*b^2*tan(e + f*x)^2 + (8*b^3*tan(e + f*x)^2)/a))/(a^3*f) +
((3*a*b^2 - a^3 + 2*b^3)/(4*a^2*b^2) - (tan(e + f*x)^2*(a^2 - b^2))/(2*a^2*b))/(f*(2*a*b + a^2 + b^2 + tan(e +
 f*x)^2*(2*a*b + 2*b^2) + b^2*tan(e + f*x)^4))

________________________________________________________________________________________